{% extends 'mytym/base.html' %}

{% block content %}
<div class="post">
    <div class="posthead">
        <h2>Statistics for {{user.username}}</h2>
        <ul>
            <li>
                Jobs worked: {{total_jobs}}
            </li>
            <li>
                Events worked: {{total_events}}
            </li>
            <li>
                Total time worked: {{time_worked}}
            </li>
            <li> Jobs hourly breakdown
                <table>
                    <tr>
                        <th>
                            Job Name
                        </th>
                        <th>
                            Hours worked
                        </th>
                    </tr>
                    {% for job in job_hr %}
                    <tr>
                        <th>
                            {{job.0}}
                        </th>
                        <td>
                            {{job.1}}
                        </td>
                    </tr>
                    {% endfor %}
                </table>
            </li>
            <li> Categories hourly breakdown
                <table>
                    <tr>
                        <th>
                            Category Name
                        </th>
                        <th>
                            Hours worked
                        </th>
                    </tr>
                    {% for cat in tag_hr %}
                    <tr>
                        <th>
                            {{cat.0}}
                        </th>
                        <td>
                            {{cat.1}}
                        </td>
                    </tr>
                    {% endfor %}
                </table>
            </li>            
        </ul>
    </div>
</div>
{% endblock %}